import request from '@/utils/request'



export default{

  experiment(dataForm) {
    return request({
      url: `/research/experiment`,
      method: 'post',
      data:{
        experimentDuration:dataForm.experimentDuration,
        experimentName:dataForm.experimentName,
        //experimentOrder:0, 不要加这个 数据库里没有哇
        id:0,
        subjectPkId:dataForm.subjectPkId,
        testeeState:dataForm.testeeState,
      }
    })
  },



  experimentSearch(subjectPkId)
  {
    return request({
      url: `/research/experiment/search`,
      method: 'post',
      data:{
        subjectPkId:subjectPkId
      }
    })



  },


  researchExperiment(id){

    return request({
      url: `/research/experiment/delete/${id}`,
      method: 'POST',
    })
  },


  updateExperiment(dataForm){
    return request({
      url: `/research/experiment`,
      method: 'PUT',
      params:{
        experimentDuration:dataForm.experimentDuration,
        experimentName:dataForm.experimentName,
        //experimentOrder:0, 不要加这个 数据库里没有哇
        id:dataForm.id,
        subjectPkId:dataForm.subjectPkId,
        testeeState:dataForm.testeeState,
      }
    })


  },

  getById(id)
  {
    return request({
      url: `/research/experiment/${id}`,
      method: 'get',
    })



  }

}
